import request from "@/utils/request";

/**
 * 获取设备列表
 * @param params
 * @returns
 */
export function getmachineList(data) {
  return request({
    url: '/management/machine.machine/getList',
    method: 'post',
    data
  })
}

/**
 * 获取单台设备信息
 * @param params
 * @returns
 */
export function getmachineFind(data) {
  return request({
    url: '/management/machine.machine/getFind',
    method: 'post',
    data
  })
}

/**
 * 添加设备
 * @param params
 * @returns
 */
export function addmachine(data) {
  return request({
    url: '/management/machine.machine/add',
    method: 'post',
    data
  })
}

/**
 * 修改设备
 * @param params
 * @returns
 */
export function updatemachine(data) {
  return request({
    url: '/management/machine.machine/update',
    method: 'post',
    data
  })
}

/**
 * 删除设备
 * @param params
 * @returns
 */
export function delmachine(data) {
  return request({
    url: '/management/machine.machine/del',
    method: 'post',
    data
  })
}

/**
 * 获取货道列表
 * @param params
 * @returns
 */
export function getchannelList(data) {
  return request({
    url: '/management/machine.machine_channel/getList',
    method: 'post',
    data
  })
}
/**
 * 导出设备货架-SKU分组
 * @param params
 * @returns
 */
export function exportSku(data) {
  return request({
    url: '/management/machine.machine_channel/exportSku',
    method: 'post',
    data
  })
}
/**
 * 导出设备货架
 * @param params
 * @returns
 */
export function channelExport(data) {
  return request({
    url: '/management/machine.machine_channel/export',
    method: 'post',
    data
  })
}
/**
 *  锁定/解锁货道价格
 * @param params
 * @returns
 */
export function lockPrice(data) {
  return request({
    url: '/management/machine.machine_channel/lockPrice',
    method: 'post',
    data
  })
}

/**
 * 添加货道列表
 * @param params
 * @returns
 */
export function addchannel(data) {
  return request({
    url: '/management/machine.machine_channel/add',
    method: 'post',
    data
  })
}

/**
 * 修改货道列表
 * @param params
 * @returns
 */
export function updatechannel(data) {
  return request({
    url: '/management/machine.machine_channel/update',
    method: 'post',
    data
  })
}

/**
 * 删除货道列表
 * @param params
 * @returns
 */
export function delchannel(data) {
  return request({
    url: '/management/machine.machine_channel/del',
    method: 'post',
    data
  })
}

/**
 * 获取配置信息列表
 * @param params
 * @returns
 */
export function getconfigList(data) {
  return request({
    url: '/management/machine.machine_config/getList',
    method: 'post',
    data
  })
}

/**
 * 获取单条配置信息
 * @param params
 * @returns
 */
export function getconfigFind(data) {
  return request({
    url: '/management/machine.machine_config/getFind',
    method: 'post',
    data
  })
}

/**
 * 添加配置信息
 * @param params
 * @returns
 */
export function addconfigList(data) {
  return request({
    url: '/management/machine.machine_config/add',
    method: 'post',
    data
  })
}

/**
 * 修改配置信息
 * @param params
 * @returns
 */
export function updateconfigList(data) {
  return request({
    url: '/management/machine.machine_config/update',
    method: 'post',
    data
  })
}

/**
 * 删除配置信息
 * @param params
 * @returns
 */
export function delconfigList(data) {
  return request({
    url: '/management/machine.machine_config/del',
    method: 'post',
    data
  })
}

/**
 * 获取设备商品
 * @param params
 * @returns
 */
export function getmacgoodsList(data) {
  return request({
    url: '/management/machine.machine_goods/getList',
    method: 'post',
    data
  })
}

/**
 * 添加设备商品
 * @param params
 * @returns
 */
export function addgoods(data) {
  return request({
    url: '/management/machine.machine_goods/add',
    method: 'post',
    data
  })
}

/**
 * 修改设备商品
 * @param params
 * @returns
 */
export function updategoods(data) {
  return request({
    url: '/management/machine.machine_goods/update',
    method: 'post',
    data
  })
}

/**
 * 删除设备商品
 * @param params
 * @returns
 */
export function delgoods(data) {
  return request({
    url: '/management/machine.machine_goods/del',
    method: 'post',
    data
  })
}

/**
 * 获取设备商品品类排序列表
 * @param params
 * @returns
 */
export function getgoodsGcSort(data) {
  return request({
    url: '/management/machine.machine_goods/getGcSort',
    method: 'post',
    data
  })
}
/**
 * 导出设备商品列表
 * @param params
 * @returns
 */
export function getgoodsexportMg(data) {
  return request({
    url: '/management/machine.machine_goods/exportMg',
    method: 'post',
    data
  })
}

/**
 *  修改设备商品品类排序
 * @param params
 * @returns
 */
export function updategoodsGcSort(data) {
  return request({
    url: '/management/machine.machine_goods/updateGcSort',
    method: 'post',
    data
  })
}

/**
 * 获取帮助信息列表
 * @param params
 * @returns
 */
export function gethelpList(data) {
  return request({
    url: '/management/machine.machine_help/getList',
    method: 'post',
    data
  })
}

/**
 * 添加帮助信息列表
 * @param params
 * @returns
 */
export function addhelpList(data) {
  return request({
    url: '/management/machine.machine_help/add',
    method: 'post',
    data
  })
}

/**
 * 修改帮助信息列表
 * @param params
 * @returns
 */
export function updatehelpList(data) {
  return request({
    url: '/management/machine.machine_help/update',
    method: 'post',
    data
  })
}

/**
 * 删除帮助信息列表
 * @param params
 * @returns
 */
export function delhelpList(data) {
  return request({
    url: '/management/machine.machine_help/del',
    method: 'post',
    data
  })
}

/**
 * 查询设备信息
 * @param params
 * @returns
 */
export function getmachineinfoFind(data) {
  return request({
    url: '/management/machine.machine_info/getFind',
    method: 'post',
    data
  })
}

/**
 * 添加设备信息
 * @param params
 * @returns
 */
export function addmachineinfo(data) {
  return request({
    url: '/management/machine.machine_info/add',
    method: 'post',
    data
  })
}

/**
 * 修改设备信息
 * @param params
 * @returns
 */
export function upmachineinfodate(data) {
  return request({
    url: '/management/machine.machine_info/update',
    method: 'post',
    data
  })
}

/**
 * 修改设备信息
 * @param params
 * @returns
 */
export function delmachineinfo(data) {
  return request({
    url: '/management/machine.machine_info/del',
    method: 'post',
    data
  })
}
/**
 * 刷新流量信息
 * @param params
 * @returns
 */
export function refreshSim(data) {
  return request({
    url: '/management/machine.machine_info/refreshSim',
    method: 'post',
    data
  })
}
/**
 * 下发获取中控电脑数据
 * @param params
 * @returns
 */
export function refreshComputer(data) {
  return request({
    url: '/management/machine.machine_info/refreshComputer',
    method: 'post',
    data
  })
}
/**
 * 设置设备灯光亮度
 * @param params
 * @returns
 */
export function setmachineLight(data) {
  return request({
    url: '/management/machine.machine/setLight',
    method: 'post',
    data
  })
}

/**
 * 设置设备音量
 * @param params
 * @returns
 */
export function setmachineVolume(data) {
  return request({
    url: '/management/machine.machine/setVolume',
    method: 'post',
    data
  })
}

/**
 * 发送主体控制命令
 * @param params
 * @returns
 */
export function sendMainControl(data) {
  return request({
    url: '/management/machine.machine/sendMainControl',
    method: 'post',
    data
  })
}

/**
 * 拍摄设备图片
 * @param params
 * @returns
 */
export function getmachineImg(data) {
  return request({
    url: '/management/machine.machine_info/getImg',
    method: 'post',
    data
  })
}

/**
 * 拍摄货道图片
 * @param params
 * @returns
 */
export function getChannelImg(data) {
  return request({
    url: '/management/machine.machine_channel/getChannelImg',
    method: 'post',
    data
  })
}

/**
 * 批量配置设备信息
 * @param params
 * @returns
 */
export function updateMoreMc(data) {
  return request({
    url: '/management/machine.machine_config/updateMoreMc',
    method: 'post',
    data
  })
}

/**
 * 批量修改设备主体信息
 * @param params
 * @returns
 */
export function updatemachineMore(data) {
  return request({
    url: '/management/machine.machine/updateMore',
    method: 'post',
    data
  })
}
/**
 * 设备商品库同步商品库价格
 * @param params
 * @returns
 */
export function synchronizationGoods(data) {
  return request({
    url: '/management/machine.machine_goods/synchronizationGoods',
    method: 'post',
    data
  })
}
/**
 * 查询设备主体多语言数据
 * @param params
 * @returns
 */
export function getListLang(data) {
  return request({
    url: '/management/machine.machine_lang/getList',
    method: 'post',
    data
  })
}
/**
 * 添加设备多语言
 * @param params
 * @returns
 */
export function addLang(data) {
  return request({
    url: '/management/machine.machine_lang/add',
    method: 'post',
    data
  })
}
/**
 * 修改设备多语言
 * @param params
 * @returns
 */
export function updateLang(data) {
  return request({
    url: '/management/machine.machine_lang/update',
    method: 'post',
    data
  })
}
/**
 * 删除设备多语言
 * @param params
 * @returns
 */
export function deltLang(data) {
  return request({
    url: '/management/machine.machine_lang/del',
    method: 'post',
    data
  })
}
/**
 * 删除设备配置多语言信息
 * @param params
 * @returns
 */
export function deltconfiLang(data) {
  return request({
    url: '/management/machine.machine_config_lang/del',
    method: 'post',
    data
  })
}
/**
 * 删除设备配置多语言信息
 * @param params
 * @returns
 */
export function addconfiLang(data) {
  return request({
    url: '/management/machine.machine_config_lang/add',
    method: 'post',
    data
  })
}
/**
 * 修改设备配置多语言信息
 * @param params
 * @returns
 */
export function updateconfiLang(data) {
  return request({
    url: '/management/machine.machine_config_lang/update',
    method: 'post',
    data
  })
}
/**
 * 查询一条配置多语言信息
 * @param params
 * @returns
 */
export function getFindconfiLang(data) {
  return request({
    url: '/management/machine.machine_config_lang/getFind',
    method: 'post',
    data
  })
}
/**
 * 查询设备配置多语言列表
 * @param params
 * @returns
 */
export function getListconfiLang(data) {
  return request({
    url: '/management/machine.machine_config_lang/getList',
    method: 'post',
    data
  })
}
/**
 * 查询设备配置多语言列表
 * @param params
 * @returns
 */
export function exportMachine(data) {
  return request({
    url: '/management/machine.machine/exportMachine',
    method: 'post',
    data
  })
}
/**
 * 获取设备开锁密码
 * @param params
 * @returns
 */
export function getOpenPass(data) {
  return request({
    url: `/management/machine.machine/getOpenPass?machine_id=${data}`,
    method: 'get',
  })
}
/**
 * 批量唤醒和休眠
 * @param params
 * @returns
 */
export function sendAllControl(data) {
  return request({
    url: '/management/machine.machine/sendAllControl',
    method: 'post',
    data
  })
}


